<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/8/7
 * Time: 20:26
 */
namespace Admin\Model;
use Base\Model\BaseModel;
class  InspectionContentChangeModel extends  BaseModel{
    protected $_link=array(
        //用户
        'user' => array(
            'mapping_type' => self::BELONGS_TO,
            'class_name'    => 'user',
            'foreign_key' => 'userid',
            'parent_key' => 'id',
            'mapping_fields' => 'id,name'
        ),
        //检查单
        'inspectioninfo' => array(
            'mapping_type' => self::BELONGS_TO,
            'class_name'    => 'inspectioninfo',
            'foreign_key' => 'indexid',
            'parent_key' => 'id',
            'mapping_fields' => 'id,name'
        ),
//        //检查单详情
//        'inspectioncontent' => array(
//            'mapping_type' => self::BELONGS_TO,
//            'foreign_key' => 'inspectioncontentid',
//            'parent_key' => 'id',
//        )
    );
//    protected $_auto = array(
//        array('status','1')
//    );
}
